package com.mzy.basics.runtimeException;

/**
 * @author Ives
 * * @date 2022/1/20
 */

import lombok.Getter;

/**
 * <p>Title:通用錯誤提示
 * <p>Description:
 *
 * @author Allen
 * @version 1.0
 * @date 2020-12-15 14:30
 */
@Getter
public enum CommonErrorEnum implements ErrorEnum {

  DB_OPERATE_ERROR("0001","數據庫操作異常"),
  PARAMETER_IS_NULL("0002", "%s is null"),
  REPEAT_SUBMIT_TW("0003", "重覆請求, 請稍後再試"),
  REPEAT_SUBMIT_EN("0004", "Repeat the request please try again later"),
  SYS_IS_MAINTAINED("0005", "系統維護中......"),
  ;

  private CommonErrorEnum(String code, String message) {
    this.code = ErrorCodeContext.of(super.getClass().getSimpleName(), code);
    this.message = message;
  }

  private final String code;

  private final String message;
}